﻿using System;
using System.Text;
using System.Collections;

namespace RMSM
{
    //---------------------------------------------------------------------------------------------
    public enum LoaiDanhMuc
    {
        None
    }

    public enum LoaiThietDat
    {
        None = 0,
        TenDonVi = 1,
        DiaChi = 2,
        DienThoai = 3,
        Email = 4,
        Website = 5,
        Anh = 6,
        SoHopDong = 7,
        LoaiTieuDe = 8,
        KhuVuc = 9,
        PQ_EditDanhMuc = 10,
        PQ_DelDanhMuc = 11,
        PQ_DelDichVuTrongHopDong = 12,
        PQ_DelHopDong = 13,
        PQ_BaoCaoTaiChinh = 14,
        PQ_TKLanSuDung = 15,
        PQ_BDSoLuongHopDong = 16,
        PQ_BDDoanhThu = 17,
        PQ_LichSuTacNghiep = 18,

        NVTP_NgayThu = 19,
        NVTP_NgayGiao = 20,
        NVTP_NgayTra = 21,
        NVTD_Ngay = 22,
        NVCH_NgayChup = 23,
        NVCH_NgayChon = 24,
        NVCH_NgayGiao = 25,
        NVQP_NgayQuay = 26,
        NVQP_NgayGiao = 27,
        NVDVK_Ngay = 28,
        PhienBan = 100
    }

    public enum FormStatus
    {
        Add,
        Edit,
        View
    }

    //---------------------------------------------------------------------------------------------
    public class SPParam
    {
        public string orderColumn = "";
        public string orderExpression = "";
        public string whereExpression = "";
        public string otherParam = null;
        public object objParam = null;

        public SPParam()
        {
        }

        public SPParam(string orderColumn, string orderExpression, string whereExpression)
        {
            this.orderColumn = orderColumn;
            this.orderExpression = orderExpression;

            if (whereExpression == null)
                this.whereExpression = "";
            else
                this.whereExpression = whereExpression;
        }

        public SPParam(string orderColumn, string orderExpression, string whereExpression, object objParam)
        {
            this.orderColumn = orderColumn;
            this.orderExpression = orderExpression;

            if (whereExpression == null)
                this.whereExpression = "";
            else
                this.whereExpression = whereExpression;

            this.objParam = objParam;
        }
    }

    //---------------------------------------------------------------------------------------------
    public delegate void OnCompletedEventHandler(object sender, OnCompletedEventArgs e);
    public class OnCompletedEventArgs : EventArgs
    {
        public object objectID = null;
        public object objectValue = null;

        public OnCompletedEventArgs()
        {
        }

        public OnCompletedEventArgs(object objectValue)
        {
            this.objectValue = objectValue;
        }

        public OnCompletedEventArgs(object objectID, object objectValue)
        {
            this.objectID = objectID;
            this.objectValue = objectValue;
        }
    }
}